public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        //创建一个数组，数组是二叉树的前序遍历结果，左右子树使用#分开
        BinaryTree.TreeNode[] tree = {
                new BinaryTree.TreeNode('A'),
                new BinaryTree.TreeNode('B'),
                new BinaryTree.TreeNode('D'),
                new BinaryTree.TreeNode('#'),
                new BinaryTree.TreeNode('E'),
                new BinaryTree.TreeNode('H'),
                new BinaryTree.TreeNode('#'),
                new BinaryTree.TreeNode('C'),
                new BinaryTree.TreeNode('F'),
                new BinaryTree.TreeNode('G')
        };
        //前序创建二叉树
        BinaryTree.TreeNode root = binaryTree.createBinaryTree(tree);
        //前序遍历二叉树
        binaryTree.proBinaryTree(root);
        System.out.println();
        //中序遍历
        binaryTree.inBinaryTree(root);
    }
}
